.bfy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.bfy-card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bfy-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 12px 24px rgba(0, 0, 0, 0.08);
}

.bfy-card > a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.bfy-card img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Shorts are portrait — let them keep their natural ratio */
.bfy-short img {
    aspect-ratio: 9 / 16;
    max-height: 360px;
}

.bfy-short .bfy-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Make the card wrapper relative for badge positioning */
.bfy-card {
    position: relative;
}

.bfy-info {
    padding: 0.85rem 1rem;
}

.bfy-info h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    line-height: 1.35;
    font-weight: 600;
    color: var(--wp--preset--color--primary, #1e1e1e);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bfy-info time {
    font-size: 0.8rem;
    color: var(--wp--preset--color--secondary, #5f5f5f);
}

.bfy-fallback {
    text-align: center;
    padding: 2rem;
    color: var(--wp--preset--color--secondary, #5f5f5f);
}
