/* ==== DEFAULT ==== */
.cards {
    display: grid;
    gap: 1rem;
    max-width: min(900px, 100%);
    margin: 0 auto;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;

    background: #fff;
    border-radius: 8px;

    transition: box-shadow 0.4s ease;
}

.card-content {
    flex: 1;
    padding: 1rem;
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 9; /* или 4/3, или 1/1 — как хочешь */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px 8px 0 0; /* скругление только сверху */
}

/* ==== STATES ==== */
.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.5);
}