@use 'design-system' as *;

.cardContainer {
    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);
    min-height: 375px;
    overflow: hidden;
}

.smallCard {
    height: 185px;
    min-height: 0px;
}

.header {
    aspect-ratio: 16 / 9;

    @media screen and (min-width: $breakpoint-community-large) {
        height: 160px;
    }

    .image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: top;
    }
}

.gitHubDetails {
    display: flex;
    gap: $spacing-size-4;
    align-items: center;
}

.gibHubIcon {
    fill: var(--color-fg-primary);
}

.titleContainer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: $spacing-size-2;
    gap: $spacing-size-4;
}

.title {
    color: var(--color-text-primary);
    font-size: var(--text-fs-base);
    font-weight: bold;
    margin-bottom: 0px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-top: $spacing-size-4;
}

.body {
    padding: $spacing-size-4;
    flex-grow: 1;
}

.imageButton {
    width: auto;
    height: $spacing-size-8;
    cursor: pointer;
    margin-left: $spacing-size-4;
    fill: var(--color-fg-primary);
}

.description {
    font-size: var(--text-fs-base);
    font-weight: var(--text-regular);
    color: var(--color-text-tertiary);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 3;
    line-height: 1.4;
    max-height: calc(1.4em * 3);
}

.footer {
    padding: $spacing-size-4;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: $spacing-size-2;
    row-gap: $spacing-size-2;
}

.frameworks {
    display: flex;
    align-items: center;
    background: transparent;
    font-weight: var(--text-regular);
    border-radius: var(--radius-2xl);
    padding: $spacing-size-1 $spacing-size-2;
    font-size: var(--text-size-2xs);
    color: var(--color-text-primary);
    margin-bottom: 0px;
}

.tags {
    display: flex;
    align-items: center;
    background: transparent;
    font-weight: var(--text-regular);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-2xl);
    padding: $spacing-size-1 $spacing-size-2;
    font-size: var(--text-fs-xs);
    color: var(--color-text-primary);
}
