/**
 * JM GDevelop Embedder – Frontend Grid
 *
 * All classes prefixed with jm-gdev-.
 * 3 columns desktop · 2 columns tablet · 1 column mobile.
 */

/* ── Grid container ─────────────────────────────────────────── */

.jm-gdev-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2%;
    justify-content: center;
    padding: 10px 0;
}

/* ── Card ────────────────────────────────────────────────────── */

.jm-gdev-card {
    width: 31%;
    max-width: 100%;
    box-sizing: border-box;
}

.jm-gdev-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.2s ease;
}

.jm-gdev-card-link:hover {
    opacity: 0.85;
}

/* ── Thumbnail ───────────────────────────────────────────────── */

.jm-gdev-card-thumb {
    overflow: hidden;
    border-radius: 10px;
    line-height: 0;          /* remove inline-block gap */
}

.jm-gdev-card-img {
    aspect-ratio: 1;
    width: 350px;
    height: 350px;
    max-width: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

/* ── Title ───────────────────────────────────────────────────── */

.jm-gdev-card-title {
    margin: 0 0 25px 0;
    padding: 3px;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

/* ── Empty state ─────────────────────────────────────────────── */

.jm-gdev-empty {
    text-align: center;
    color: #666;
    font-style: italic;
}

/* ── Responsive: tablet (2 columns) ─────────────────────────── */

@media (max-width: 1099px) and (min-width: 768px) {
    .jm-gdev-card {
        width: calc(50% - 12px);
    }
    .jm-gdev-card-img {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

/* ── Responsive: mobile (1 column) ──────────────────────────── */

@media (max-width: 767px) {
    .jm-gdev-card {
        width: 100%;
    }
    .jm-gdev-card-img {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}
