.mc-gallery-wrap {
    width: 100%;
}

/* ── Grid ─────────────────────────────────────────────────── */
.mc-gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    row-gap: 16px;
    column-gap: 16px;
}

.mc-gallery-item {
    overflow: hidden;
    grid-column: span 6;
}

.mc-gallery-item img {
    display: block;
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: center;
}

/* ── 8-item repeating pattern ─────────────────────────────── */

/* Row 1 – 1 photo, full width */
.mc-gallery-item:nth-child(8n+1) {
    grid-column: span 6;
}

/* Row 2 – 3 photos, 1/3 each */
.mc-gallery-item:nth-child(8n+2),
.mc-gallery-item:nth-child(8n+3),
.mc-gallery-item:nth-child(8n+4) {
    grid-column: span 2;
}

/* Row 3 – 2/3 + 1/3 */
.mc-gallery-item:nth-child(8n+5) {
    grid-column: span 4;
}
.mc-gallery-item:nth-child(8n+6) {
    grid-column: span 2;
}

/* Row 4 – 50% / 50% */
.mc-gallery-item:nth-child(8n+7),
.mc-gallery-item:nth-child(8n+8) {
    grid-column: span 3;
}

/* ── Pagination ───────────────────────────────────────────── */
.mc-gallery-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 32px;
}

.mc-gallery-pagination a,
.mc-gallery-pagination span.current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mc-gallery-pagination a {
    background-color: #f0f0f0;
    color: #252525;
}

.mc-gallery-pagination a:hover {
    background-color: #d0d0d0;
    color: #252525;
}

.mc-gallery-pagination span.current {
    background-color: #252525;
    color: #ffffff;
    cursor: default;
}

/* ── RWD – tablet & mobile (≤ 1024px): single column ─────── */
@media (max-width: 1024px) {
    .mc-gallery-item:nth-child(8n+1),
    .mc-gallery-item:nth-child(8n+2),
    .mc-gallery-item:nth-child(8n+3),
    .mc-gallery-item:nth-child(8n+4),
    .mc-gallery-item:nth-child(8n+5),
    .mc-gallery-item:nth-child(8n+6),
    .mc-gallery-item:nth-child(8n+7),
    .mc-gallery-item:nth-child(8n+8) {
        grid-column: span 6;
    }
}
