.gallery-pro {
    --gp-gutter: 8px;
    --gp-cols: 2;
    --gp-cols-sm: 3;
    --gp-cols-md: 4;
    --gp-cols-lg: 5;
    --gp-aspect: 3 / 2;
    position: relative;
}

.gallery-pro[hidden],
.gp-lightbox[hidden] {
    display: none !important;
}

.gp-status {
    margin: 0;
    padding: 1.5rem 0;
    color: inherit;
    opacity: 0.7;
}

.gp-grid {
    display: grid;
    gap: var(--gp-gutter);
    grid-template-columns: repeat(var(--gp-cols), minmax(0, 1fr));
}

@media (min-width: 576px) {
    .gp-grid {
        grid-template-columns: repeat(var(--gp-cols-sm), minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .gp-grid {
        grid-template-columns: repeat(var(--gp-cols-md), minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .gp-grid {
        grid-template-columns: repeat(var(--gp-cols-lg), minmax(0, 1fr));
    }
}

.gp-grid .gp-item {
    position: relative;
    display: block;
    aspect-ratio: var(--gp-aspect);
    overflow: hidden;
    background: #111;
}

.gp-grid .gp-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gp-masonry {
    column-count: var(--gp-cols);
    column-gap: var(--gp-gutter);
}

@media (min-width: 576px) {
    .gp-masonry {
        column-count: var(--gp-cols-sm);
    }
}

@media (min-width: 768px) {
    .gp-masonry {
        column-count: var(--gp-cols-md);
    }
}

@media (min-width: 992px) {
    .gp-masonry {
        column-count: var(--gp-cols-lg);
    }
}

.gp-masonry .gp-item {
    position: relative;
    display: block;
    break-inside: avoid;
    margin: 0 0 var(--gp-gutter);
    overflow: hidden;
    background: #111;
}

.gp-masonry .gp-item img {
    width: 100%;
    height: auto;
    display: block;
}

.gp-justified {
    display: flex;
    flex-direction: column;
    gap: var(--gp-gutter);
}

.gp-row {
    display: flex;
    gap: var(--gp-gutter);
    width: 100%;
}

.gp-row .gp-item {
    position: relative;
    display: block;
    flex: 0 0 auto;
    overflow: hidden;
    background: #111;
    height: 100%;
}

.gp-row .gp-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gp-item {
    color: inherit;
    text-decoration: none;
    cursor: zoom-in;
}

.gp-item:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.gp-item.has-overlay .gp-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.25rem;
    padding: 0.75rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.05) 55%, transparent);
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.gp-item.has-overlay:hover .gp-overlay,
.gp-item.has-overlay:focus-visible .gp-overlay {
    opacity: 1;
}

.gp-overlay-title,
.gp-overlay-description,
.gp-overlay-year,
.gp-overlay-copyright,
.gp-overlay-exif {
    margin: 0;
    line-height: 1.3;
}

.gp-overlay-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.gp-overlay-description,
.gp-overlay-exif,
.gp-overlay-copyright,
.gp-overlay-year {
    font-size: 0.78rem;
    opacity: 0.92;
}

.gp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.94);
    color: #fff;
}

.gp-lb-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
    cursor: zoom-in;
}

.gp-lb-stage.is-zoomed {
    cursor: grab;
}

.gp-lb-stage.is-panning {
    cursor: grabbing;
}

.gp-lb-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
    will-change: transform;
}

.gp-lb-caption {
    flex: 0 0 auto;
    padding: 0.85rem 4.5rem 1.15rem;
}

.gp-lb-section + .gp-lb-section {
    margin-top: 0.4rem;
}

.gp-lb-btn {
    position: absolute;
    z-index: 2;
    appearance: none;
    border: 0;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
}

.gp-lb-btn:hover,
.gp-lb-btn:focus-visible {
    background: rgba(255, 255, 255, 0.18);
    outline: none;
}

.gp-lb-close {
    top: 12px;
    right: 12px;
}

.gp-lb-prev,
.gp-lb-next {
    top: 50%;
    transform: translateY(-50%);
}

.gp-lb-prev {
    left: 12px;
}

.gp-lb-next {
    right: 12px;
}

.gp-lb-btn[hidden] {
    display: none !important;
}

body.gp-lb-open {
    overflow: hidden;
}

@media (max-width: 700px) {
    .gp-lb-caption {
        padding: 0.75rem 1rem 1rem;
    }

    .gp-lb-prev,
    .gp-lb-next {
        top: auto;
        bottom: 5.5rem;
        transform: none;
    }
}
