.mgp-gallery {
    --mgp-cols: 3;
}

.mgp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.mgp-filter {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mgp-filter.is-active,
.mgp-filter:hover {
    background: #111;
    color: #fff;
    border-color: #111;
}

.mgp-grid {
    display: grid;
    grid-template-columns: repeat(var(--mgp-cols), 1fr);
    grid-auto-rows: 1px;
    align-items: start;
}

.mgp-item {
    margin: 0;
    overflow: hidden;
    border-radius: 6px;
    position: relative;
}

.mgp-item.is-hidden {
    display: none;
}

.mgp-item-link {
    display: block;
    position: relative;
    line-height: 0;
    color: inherit;
    text-decoration: none;
}

.mgp-item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.mgp-item-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 12px;
    color: #fff;
    font-size: 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Hover: zoom */
.mgp-hover-zoom .mgp-item-link:hover img {
    transform: scale(1.08);
}
.mgp-hover-zoom .mgp-item-link:hover .mgp-item-overlay {
    opacity: 1;
}

/* Hover: fade */
.mgp-hover-fade .mgp-item-link:hover img {
    opacity: 0.75;
}
.mgp-hover-fade .mgp-item-link:hover .mgp-item-overlay {
    opacity: 1;
}

/* Hover: overlay slide up */
.mgp-hover-overlay .mgp-item-overlay {
    transform: translateY(100%);
    opacity: 1;
}
.mgp-hover-overlay .mgp-item-link:hover .mgp-item-overlay {
    transform: translateY(0);
}

.mgp-load-more-wrap {
    text-align: center;
    margin-top: 24px;
}

.mgp-load-more {
    background: #111;
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 10px 28px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.mgp-load-more:hover {
    opacity: 0.85;
}

/* Lightbox */
.mgp-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

.mgp-lightbox.is-open {
    display: flex;
}

body.mgp-lightbox-open {
    overflow: hidden;
}

.mgp-lightbox-stage {
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.mgp-lightbox-image {
    max-width: 90vw;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
}

.mgp-lightbox-caption {
    color: #fff;
    margin-top: 12px;
    font-size: 14px;
}

.mgp-lightbox-close,
.mgp-lightbox-prev,
.mgp-lightbox-next {
    position: absolute;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    padding: 8px 16px;
}

.mgp-lightbox-close {
    top: 16px;
    right: 16px;
    font-size: 32px;
}

.mgp-lightbox-prev {
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.mgp-lightbox-next {
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 640px) {
    .mgp-lightbox-prev,
    .mgp-lightbox-next {
        font-size: 28px;
    }
}
