/* ConnorModuleSuite — Gallery Grid
 * Uses CSS grid for the column container; JS distributes images into
 * .connor-gallery__col divs in row-major order for correct reading order.
 * Falls back to a single-column flat list if JS hasn't run yet. */

.connor-gallery {
    display: grid;
    grid-template-columns: repeat(var(--cgms-cols, 3), 1fr);
    gap: var(--cgms-gap, 12px);
}

/* Before JS runs, flat <a> tags stack in a single column */
.connor-gallery > a {
    display: block;
    line-height: 0;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

/* After JS distributes into columns */
.connor-gallery__col {
    display: flex;
    flex-direction: column;
    gap: var(--cgms-gap, 12px);
}

.connor-gallery__col a {
    display: block;
    line-height: 0;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

.connor-gallery img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.connor-gallery a:hover img {
    transform: scale(1.03);
}

@media (max-width: 1024px) {
    .connor-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .connor-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}
